package com.wzu.springbootcrud2.controller;

import org.mybatis.logging.Logger;
import org.mybatis.logging.LoggerFactory;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/error")
public class BaseErrorController implements ErrorController {

private static final Logger logger = LoggerFactory.getLogger(BaseErrorController.class);
    @Override
    public String getErrorPath() {
        return "error";
    }
    @RequestMapping
    public String error(ModelMap map) {
        map.put("error", "错误信息是！！！！");
        return "error";
    }

}
